package com.ruoyi.object.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.object.mapper.ObjectDemocraticPartyMapper;
import com.ruoyi.object.domain.ObjectDemocraticParty;
import com.ruoyi.object.service.IObjectDemocraticPartyService;

/**
 * 民主党派成员Service业务层处理
 * 
 * @author Lewis
 * @date 2022-05-11
 */
@Service
public class ObjectDemocraticPartyServiceImpl implements IObjectDemocraticPartyService 
{
    @Autowired
    private ObjectDemocraticPartyMapper objectDemocraticPartyMapper;

    /**
     * 查询民主党派成员
     * 
     * @param id 民主党派成员主键
     * @return 民主党派成员
     */
    @Override
    public ObjectDemocraticParty selectObjectDemocraticPartyById(Long id)
    {
        return objectDemocraticPartyMapper.selectObjectDemocraticPartyById(id);
    }

    /**
     * 查询民主党派成员列表
     * 
     * @param objectDemocraticParty 民主党派成员
     * @return 民主党派成员
     */
    @Override
    public List<ObjectDemocraticParty> selectObjectDemocraticPartyList(ObjectDemocraticParty objectDemocraticParty)
    {
        return objectDemocraticPartyMapper.selectObjectDemocraticPartyList(objectDemocraticParty);
    }

    /**
     * 新增民主党派成员
     * 
     * @param objectDemocraticParty 民主党派成员
     * @return 结果
     */
    @Override
    public int insertObjectDemocraticParty(ObjectDemocraticParty objectDemocraticParty)
    {
        objectDemocraticParty.setCreateTime(DateUtils.getNowDate());
        return objectDemocraticPartyMapper.insertObjectDemocraticParty(objectDemocraticParty);
    }

    /**
     * 修改民主党派成员
     * 
     * @param objectDemocraticParty 民主党派成员
     * @return 结果
     */
    @Override
    public int updateObjectDemocraticParty(ObjectDemocraticParty objectDemocraticParty)
    {
        objectDemocraticParty.setUpdateTime(DateUtils.getNowDate());
        return objectDemocraticPartyMapper.updateObjectDemocraticParty(objectDemocraticParty);
    }

    /**
     * 批量删除民主党派成员
     * 
     * @param ids 需要删除的民主党派成员主键
     * @return 结果
     */
    @Override
    public int deleteObjectDemocraticPartyByIds(Long[] ids)
    {
        return objectDemocraticPartyMapper.deleteObjectDemocraticPartyByIds(ids);
    }

    /**
     * 删除民主党派成员信息
     * 
     * @param id 民主党派成员主键
     * @return 结果
     */
    @Override
    public int deleteObjectDemocraticPartyById(Long id)
    {
        return objectDemocraticPartyMapper.deleteObjectDemocraticPartyById(id);
    }
}
